package com.itheima.job3;

import java.io.FileInputStream;
import java.io.IOException;

public class Test2 {
    public static void main(String[] args) {
        FileInputStream fis=null;
        try {
             fis = new FileInputStream("E:test/text.txt");
            byte[] buffer = new byte[3];
            int read;
            String content="";
            while((read=fis.read(buffer))!=-1){
                content+=new String(buffer,0,read);
            }
            String s = content.replaceAll("TMD", "***").replaceAll("SB", "**");
            System.out.println(content);
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                fis.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }



}
